package com.cnunicom.modules.tra.task;

import com.cnunicom.modules.job.task.ITask;
import com.cnunicom.modules.tra.service.RecordService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: dingziyuan
 * @Date: 2020/1/29/029 20:45
 * @Description: 每晚定时插入当天的客房记录
 */
@Component("recordTask")
public class RecordTask implements ITask {
    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private RecordService recordService;

    @Override
    public void run(String params){
        logger.debug("RecordTask定时任务正在执行，参数为：{}", params);
        recordService.tableInsert();
    }
}

